﻿@model NerdDinner.Models.Dinner

@{
    ViewBag.Title = "Host a Nerd Dinner";
}

<h2>Host a Dinner</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken() 
    @Html.ValidationSummary(true)

    <fieldset>
        <legend></legend>

        @Html.HiddenFor(model => model.DinnerID)

        <div id="dinnerDiv" style="float: right;">
            <div class="editor-label">
                @Html.LabelFor(model => model.Title)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.EventDate)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.EventDate)
                @Html.ValidationMessageFor(model => model.EventDate)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Description)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.HostedBy)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.HostedBy)
                @Html.ValidationMessageFor(model => model.HostedBy)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.ContactPhone)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.ContactPhone)
                @Html.ValidationMessageFor(model => model.ContactPhone)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Address)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Address)
                @Html.ValidationMessageFor(model => model.Address)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.Country)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Country)
                @Html.ValidationMessageFor(model => model.Country)
            </div>
        </div>
        <div id="mapDiv" style="float: left;">
            @Html.EditorFor(model => model.Location)
            @Html.EditorFor(model => model.LocationDetail)
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
